package cqrtplm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.hustcad.plm.pdm.filevault.model.dto.FileInfoDTO;
import com.ty.basic.session.TyAccountContext;
import lombok.Data;

import javax.persistence.*;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;

@Entity
@Data
@Table(name="RT_PRJ_DETS_MEASURES")
public class PreventErrorCorrectionDO {

    @Transient
    private BigInteger oid;

    @Transient
    private List<String> file;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String  mid;

    //类型
    @TableField(value = "type")
    private String type;

    //项目编号
    @TableField(value = "projectno")
    private String projectNo;

    //终端机型
    @TableField(value = "terminalmodel")
    private String terminalModel;

    //动力型号
    @TableField(value = "powermodel")
    private String powerModel;

    //零部件名称
    @TableField(value = "partname")
    private String componentName;

    //图样代号
    @TableField(value = "drawingcode")
    private String patternCode;

    //发生日期
    @TableField(value = "happendate")
    private Date occurrenceDate;

    //发生阶段
    @TableField(value = "stage")
    private String occurrenceStage;

    //发生环境
    @TableField(value = "environment")
    private String occurrenceEnvironment;

    //不良现象描述
    @TableField(value = "phenomenon")
    private String phenomenonDescription;

    //不良现象图片
    @TableField(value = "phenomenonfile")
    private String phenomenonFile;

    //原因解析描述
    @TableField(value = "reson")
    private String analysisDescription;

    //对策（暂定对策）
    @TableField(value = "tentativecountermeasures")
    private String tentativeCountermeasures;

    //对策（恒久对策）
    @TableField(value = "countermeasure")
    private String longCountermeasures;

    //源流改善
    @TableField(value = "sourceimprovement")
    private String sourceImprovement;

    //对策(支持文件)
    @TableField(value = "COUNTERMEASUREFILE")
    private String countermeasure;

    //供应商
    @TableField(value = "supplier")
    private String supplier;

    //问题类型
    @TableField(value = "problemtype")
    private String problemType;

    //关闭阶段
    @TableField(value = "closingstage")
    private String closingStage;
    //承接人
    @TableField(value = "undertaker")
    private String personResponsible;

    //实验委托人
    @TableField(value = "ENTRUSTPERSONNAME")
    private String experimentalCommissioner;

    //反馈部门
    @TableField(value = "department")
    private String department;

    //反馈人
    @TableField(value = "feedbackperson")
    private String feedbackPerson;

    //重要度
    @TableField(value = "importance")
    private String importance;

    //计划完成日期
    @TableField(value = "plandate")
    private Date plannedDate;

    //确认方式
    @TableField(value = "confirm")
    private String confirmationMethod;

    //确认结果附件
    @TableField(value = "confirmfile")
    private String confirmFile;
    //进度确认
    @TableField(value = "progress")
    private String progressConfirmation;
    //是否关闭
    @TableField(value = "isclose")
    private String isClose;
    //确认日期
    @TableField(value = "confrmdate")
    private Date confirmDate;
    //确认人
    @TableField(value = "confirmperson")
    private String confirmationPerson;
    //备注
    @TableField(value = "remark")
    private String remark;

    //上传人
    @TableField(value = "uploader")
    private String uploader= TyAccountContext.getUser().getFullname();

    //视频附件
    @TableField(value = "VIDEOFILE")
    private String videoFile;

    //关联的问题
    @TableField(value = "CHANGEISSUECODE")
    private String changeIssueCode;

    @Transient
    private List<FileInfoDTO> fileInfoList;

}
